{% extends 'layout.html' %}
{% block content %}
    <div class="luffy-container">
        <div class="btn-group" style="margin: 5px 0">
            <a class="btn btn-default" href="{% url "rbac:userinfo_add" %}">
                <i class="fa fa-plus-square" aria-hidden="true"></i> 添加用户
            </a>
        </div>
        <table class="table table-bordered table-hover">
            <thead>
            <tr>
                <th>序号</th>
                <th>用户名称</th>
                <th>电子邮箱</th>
                <th>密码重置</th>
                <th>选项</th>
            </tr>
            </thead>
            <tbody>
            {% for row in data_list %}
                <tr>
                    <td>{{ forloop.counter }}</td>
                    <td>{{ row.username }}</td>
                    <td>{{ row.email }}</td>
                    <td><a href="{% url "rbac:userinfo_reset_password" pk=row.id %}">重置密码</a></td>
                    <td>
                        <a style="color: #333333;" href="{% url "rbac:userinfo_edit" pk=row.id %}">
                            <i class="fa fa-edit" aria-hidden="true"></i></a>
                        |
                        <a style="color: #d9534f;" href="{% url "rbac:userinfo_del" pk=row.id %}"><i
                                class="fa fa-trash-o"></i></a>
                    </td>
                </tr>
            {% endfor %}
            </tbody>
        </table>
    </div>
{% endblock %}